package com.example.controller;

import com.example.pojo.Result;
import com.example.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/sms")
public class SmsController {

    @Autowired
    private SmsService smsService;

    @GetMapping("/sendCode")
//    @GetMapping("/sendCode")
    public Result sendValidateCode(@RequestParam String phone) {
        smsService.sendValidateCode(phone);
        return Result.success("发送成功");
    }
}
